from django.contrib import admin
from django.urls import path, include
from . import views
from django.conf.urls.static import static
from django.conf import settings
from rest_framework.routers import DefaultRouter
from curriculum.views import course_index_search


router = DefaultRouter()
router.register(r'curriculum', views.ShowCourse)
router.register(r'coursetag', views.TagView)
router.register(r'chapter', views.ChapterView)
router.register(r'user_sections', views.UserSectionsViewSet)
router.register(r'sections', views.SectionsViewSet)
# CourseNodeView
router.register(r'cnode', views.CourseNodeView)
router.register(r'comment', views.CommentViewSet)
router.register(r'commentreply', views.CommentReplyViewSet)

router.register(r'follow', views.FollowViewSet)  # curriculum/follow
urlpatterns = [
    # path('showcourse/', views.ShowCourse.as_view()), #curriculum/showcourse
    path('pathshow/', views.PathShow.as_view()),  # curriculum/pathshow/
    path('addfollow/', views.AddFollow.as_view()),  # curriculum/addfollow/
    path('addplayhistory/', views.AddPlayHistory.as_view()), #curriculum/addplayhistory/
    # path('search/', course_index_search),

]
urlpatterns += router.urls
